class Solution:
    def isPalindrome(self, x: int) -> bool:
        s = str(x)
        length = len(s)
        i = 0
        j = length - 1
        isPalindrome = False
        while j >= length / 2:
            if s[i] == s[j]:
                i += 1
                j -= 1
            else:
                break
        if j < length / 2:
            isPalindrome = True
        return isPalindrome


solution = Solution()
print(solution.isPalindrome(12210))

# Success
# Runtime: 52 ms, faster than 99.76% of Python3 online submissions for Palindrome Number.
# Memory Usage: 13.2 MB, less than 77.47% of Python3 online submissions for Palindrome Number.

# 回文数，太简单，不过发现leetcode测试的这个结果不是很准，这个算法我第一次提交是89.5%左右，重复提交两次后变成了99.76%
